<template>
  <div>
      <ul>
          <li v-for="i in list" :key="i">{{i.title}}------------ <button @click="show(i.id)">详情</button></li>
      </ul>
  </div>
</template>

<script>
import axios from '../../http/axios'
export default {
data () {
    return {
    list:[]    
    }
},
methods: {
    get_list(){
        axios('/addtask','get').then(res=>{
            console.log(res)
            this.list=res.list
        })
    },
    show(id){
        this.$router.push({path:"/show_leave",query:{'id':id}})
    }
},
mounted () {
    this.get_list()
}
}
</script>

<style>

</style>